CC=g++
CFLAGS=-c -Wall -ansi -pedantic -ggdb
LDFLAGS=-ltar -lpthread
SOURCES=main.cpp Runner.cpp FileFS.cpp \
		FileTAR.cpp IFileTest.cpp Listener.cpp Transfer.cpp Packet.cpp \
		TransferFactory.cpp TransferRead.cpp TransferWrite.cpp
#SOURCES=main.cpp FileFS.cpp FileTAR.cpp IFileTest.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=tarftp

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm $(OBJECTS)
	rm $(EXECUTABLE)
